package nl.rainbowsheep.reisorg.rest.service.repository;

import java.util.List;
import nl.rainbowsheep.reisorg.rest.service.model.Customer;
import nl.rainbowsheep.reisorg.rest.service.model.BurritoUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.query.Param;

/**
 * Repository for Customers which is an interface. This repo extends from
 * JpaRepository. JpaRepository will implement the crud operations.
 */
public interface CustomerRepository extends JpaRepository<Customer, Long> {

    List<Customer> findByLastname(@Param("lastname") String lastname);

    List<Customer> findByLastnameLike(@Param("lastname") String lastname);

//        Customer findByBurritoUser(BurritoUser burritoUser); 
    Customer findByBurritoUserId(long burritoUserId);
}
